//
//  BBSAddCaseModel.m
//  QuickCure
//
//  Created by 石玄机 on 16/9/13.
//  Copyright © 2016年 haoge. All rights reserved.
//

#import "BBSAddCaseModel.h"

//定义归档接档数据对应的key
static NSString * const kAddTime = @"addTime";
static NSString * const kDiseaseType = @"diseaseType";
static NSString * const kSubdivideType = @"subdivideType";
static NSString * const kTextViewText = @"textViewText";
static NSString * const kImageData = @"imageData";


@implementation BBSAddCaseModel

/** 协议方法-对数据进行序列化*/
- (void)encodeWithCoder:(NSCoder *)aCoder{
    
    [aCoder encodeObject:_addTime forKey:kAddTime];
    [aCoder encodeObject:_diseaseType forKey:kDiseaseType];
    [aCoder encodeObject:_subdivideType forKey:kSubdivideType];
    [aCoder encodeObject:_textViewText forKey:kTextViewText];
    [aCoder encodeObject:_imageData forKey:kImageData];
}

/** 协议方法-对数据进行反序列化并读取*/
- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    
    if (self = [super init]) {
        
        _addTime = [aDecoder decodeObjectForKey:kAddTime];
        _diseaseType = [aDecoder decodeObjectForKey:kDiseaseType];
        _subdivideType = [aDecoder decodeObjectForKey:kSubdivideType];
        _textViewText = [aDecoder decodeObjectForKey:kTextViewText];
        _imageData = [aDecoder decodeObjectForKey:kImageData];
    }
    return self;
}



@end

